﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using System.Data.Entity.ModelConfiguration.Conventions;
using System.Linq;
using System.Web;
using WebApplication2.Models;

namespace WebApplication2.DAL
{
    public class AccountContext: DbContext
    {
        public AccountContext() : base("AccountContext") { }
        public DbSet<SysUser> SysUsers { get; set; }
        public DbSet<SysRole> SysRoles { get; set; }
        public DbSet<SysUserRole> SysUserRoles { get; set; }


        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
          //  modelBuilder.Conventions.Remove<IncludeMetadataConvention>();
          //  AddEntityMapping(modelBuilder);
            //....  
            base.OnModelCreating(modelBuilder);
        }

  


    }

  
}